﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Cms/Admin.Master" AutoEventWireup="true"
    CodeBehind="ChangePassword.aspx.cs" Inherits="Aij1.Cms.ChangePassword" %>

<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxCallback" tagprefix="dx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script type="text/javascript">
    function btnOK_Click(s, e) {
        if (txtNewPass.GetText() != txtConfirm.GetText()) {
            alert("两个密码不同!");
            return;
        }
        btnOK.SetEnabled(false);
        callback.PerformCallback();
    }

    function callback_Complete(s, e) {
        btnOK.SetEnabled(true);
        lblTips.SetText(e.result);
    }
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="PH" runat="server">
    <div style="margin: 15% auto; width: 500px;">
        <table width="100%">
            <tr>
                <td width="80">
                    用户名:
                </td>
                <td class="style2">
                    <%=CurrentUser.SysName%>
                </td>
            </tr>
            <tr>
                <td width="80">
                    原密码:
                </td>
                <td>
                    <dx:ASPxTextBox ID="txtOldPass" runat="server" Password="True" Width="170px" ClientInstanceName="txtOldPass">
                    </dx:ASPxTextBox>
                </td>
            </tr>
            <tr>
                <td>
                    新密码:
                </td>
                <td>
                    <dx:ASPxTextBox ID="txtNewPass" runat="server" Password="True" Width="170px" ClientInstanceName="txtNewPass">
                    </dx:ASPxTextBox>
                </td>
            </tr>
            <tr>
                <td>
                    确认新密码:
                </td>
                <td>
                    <dx:ASPxTextBox ID="txtConfirm" runat="server" Password="True" Width="170px" ClientInstanceName="txtConfirm">
                    </dx:ASPxTextBox>
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;
                    <dx:ASPxCallback ID="ASPxCallback1" runat="server" 
                        ClientInstanceName="callback" oncallback="ASPxCallback1_Callback">
                        <ClientSideEvents CallbackComplete="callback_Complete" />
                    </dx:ASPxCallback>
                </td>
                <td>
                    <dx:ASPxButton ID="btnOK" runat="server" Text="修改" ClientInstanceName="btnOK" 
                        AutoPostBack="False">
                        <ClientSideEvents Click="btnOK_Click" />
                    </dx:ASPxButton>
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;</td>
                <td>
                    <dx:ASPxLabel ID="lblTips" runat="server" ClientInstanceName="lblTips" 
                        CssClass="tips">
                    </dx:ASPxLabel>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
